{% extends "base.html" %}
{% block content %}
  <div class="in_border add_task_form">
    <form method="POST" action="/task/add/" autocomplete="off">
        {% for field in task_form %}
            {% if field.errors %}
                <div class="field_e">
                    <div class="field_label_e">{{ field.label_tag }}</div>
                    <div class="field_act_e">{{ field }}</div>
                            <span class="field_errors">
                                {% for err in field.errors %}
                                    <span class="field_error">{{ err }}&nbsp;</span>
                                {% endfor %}
                            </span>
                </div>
            {% else %}
                <div class="field">
                    <div class="field_label">{{ field.label_tag }}</div>
                    <div class="field_act">{{ field }}</div>
                </div>
            {% endif %}
        {% endfor %}
        <div class="field">
            <div class="field_label"><label for="id_priority">Приоритет</label></div>
            <div class="field_act"><input id="id_priority" type="text" name="priority" maxlength="2" value="0"/></div>
        </div>
        <p>
            <input type="submit" value="Отправить">
            <input type="reset" value="Очистить">
        </p>
    </form>
  </div>
{% endblock %}

